#include <Volume.h>
#include <VolumeUnit.h>

Volume::Volume(const unsigned int& amount, const VolumeUnit& unit)
             :amountInBaseUnit(amount * unit.toAmountInBaseUnit( ))
{

}

bool Volume::operator==(const Volume & volume) const
{
	return amountInBaseUnit == volume.amountInBaseUnit;
}

bool Volume::operator!=(const Volume & volume) const
{
	return !operator==(volume);
}

Volume Volume::operator+(const Volume & volume) const
{
	return Volume(amountInBaseUnit + volume.amountInBaseUnit,TBSP);
}
